package com.example.blog.component;

import com.example.blog.service.SendMailSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Question SendEmail
 * @Date 2023/1/23 0:32
 * @Solution
 */
@Component
public class SendEmail {
    @Autowired
    private SendMailSevice sendMailSevice;
    public String sentOne(String accept,String username) {
        String content=
                "尊敬的用户：请点击此链接修改您的密码：http://localhost:8800/changePw.html?username="+username;
        sendMailSevice.sendEmail(accept,content);
        return "发送成功";
    }
}
